package anewp;

public class daosanjiao {
    public static void main(String[] args) {
        int row=5;
        {
            for (int i = 1; i <=2*row-1 ; i++) {
                System.out.print("*");
            };
            System.out.println();
        }//第一行
        for (int i = 2; i <=row-1 ; i++) {
            for (int j = 1; j <=i-1 ; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j <=1 ; j++) {
                System.out.print("*");
            }
            for (int j = 1; j <=row*2-1-((i-1)*2)-2; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j <=1 ; j++) {
                System.out.print("*");
            }
            System.out.println();
         }
        for (int i = row; i <=row ; i++) {
            for (int j = 1; j <=row-1 ; j++) {
                System.out.print(" ");
            }
            System.out.print("*");
        }
            System.out.println();
        }
        /*
        ******* 1 7 0（前空） 5(中空
         *   *  2 2 1 3 row*2-1-((i-1)*2)-2
          * *   3 2 2 1
           *    4 2 3 0
         */
    }

